﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="product_add.aspx.cs" Inherits="Com.CMS263.Web.manage.ProductManage.product_add" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台-产品管理</title>
    <link href="/manage/css/common.css" rel="stylesheet" type="text/css" />
    <link href="/manage/css/main.css" rel="stylesheet" type="text/css" />
    <link href="/manage/css/box.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript" src="/manage/js/common.js"></script>

    <script language="javascript" type="text/javascript">
        function checkForm() {
            var o1 = _('txtTitle'), o2 = _('txtProductNum'), o3 = _('txtDescription'), o4 = _('txtProductImg'), o5 = _('txtSalePrice'),
		r1 = /^[a-z]([a-z ]+[a-z])?$/i, r2 = /^\d+$/, r3 = /^\d+(\.\d{2})?$/;
            if (o1.value.length<1) { return ts(o1, '请输入产品名称!'); }
            if (o2.value.length < 1) { return ts(o2, '请输入产品编号!'); }
            if (o3.value.length < 1) { return ts(o3, '请输入产品简介!'); }
            if (o5.value.length < 1) { return ts(o5, '请输入产品价格!'); }
            //if (o4.value.length < 1) { return ts(o4, '错误!'); }
           // if (o5.value.length < 1) { return ts(o6, '错误!'); }
            
            return true;
        }
        function ts(o, m) {
            o.focus(); alert(m); return false;
        }
       
    </script>

</head>
<body>
    <form id="form1" name="form1" runat="server" action="" enctype="multipart/form-data"
    method="post">
    <div class="main">
        <div class="mainMenu">
            <div class="mainMenuList">
                <ul>
                    <li class="s"><a href="product_add.aspx"><b>添加商品</b><span></span></a></li>
                    <li><a href="product_list.aspx"><b>商品列表</b><span></span></a></li>
                </ul>
            </div>
        </div>
        <div class="mainContent">
            <div class="con1 productForm">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
                    <tr>
                        <td width="180" class="r">
                            *产品名称：
                        </td>
                        <td>
                            <input id="txtTitle" name="txtTitle" type="text" class="input1" style="width: 155px" />
                        </td>
                    </tr>
                    <tr>
                        <td class="r">
                            *产品编号：
                        </td>
                        <td>
                            <input id="txtProductNum" name="txtProductNum" type="text" class="input1" style="width: 155px" />
                        </td>
                    </tr>
                    <tr>
                        <td class="r">
                            *产品简介：
                        </td>
                        <td>
                            <textarea id="txtDescription" name="txtDescription" cols="" rows="" class="textarea1"
                                style="width: 400px; height: 100px"></textarea>
                        </td>
                    </tr>
                    <tr style="display:none">
                        <td class="r">
                            *所属规模：
                        </td>
                        <td>
                            <input name="style" type="checkbox" value=",100," checked="checked" />
                            100&nbsp;&nbsp;<input name="style" type="checkbox" value=",150,"  checked="checked"/>
                            150&nbsp;&nbsp;<input name="style" type="checkbox" value=",200," checked="checked" />
                            200&nbsp;&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="r">
                            *商品图片：
                        </td>
                        <td>
                            <input name="txtProductImg" id="txtProductImg" type="file" class="input1" style="width: 155px" />
                        </td>
                    </tr>
                    <tr>
                        <td class="r">
                            *商品类型：
                        </td>
                        <td>
                            <select name="txtType" id="txtType" class="input1" style="width: 155px">
                                <option value="1">婚纱</option>
                                <option value="2">喜酒</option>
                                <option value="3">喜帖</option>
                                <option value="4">珠宝</option>
                                <option value="5">礼品</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="r">
                            *产品价格：
                        </td>
                        <td>
                            <input id="txtSalePrice" name="txtSalePrice" type="text" class="input1" style="width: 155px" />
                        </td>
                    </tr>
                    <tr>
                        <td class="r">
                            *商品状态：
                        </td>
                        <td>
                            <input name="state" type="radio" value="1" checked="checked" />
                            正常&nbsp;&nbsp;<input name="state" type="radio" value="0" />
                            下架&nbsp;&nbsp;
                        </td>
                    </tr>
                </table>
            </div>
            <div class="con1 productFormBtn cf">
                <div class="btn3">
                    <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" OnClientClick="return checkForm()" />
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
